#include<stdio.h>

int main()
{
    int count = 0;
    for (int i = 1; i <= 100; i++) {
        int temp = i;
        while (temp > 0) {
            int digit = temp % 10;
            if (digit == 9) {
                ++count;
            }
            temp /= 10;
        }
    }
    printf("%d", count);
    return 0;
}